<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //window.location

        //属性
        console.log(location.href);//获取当前地址栏中的url 
        setTimeout(function () {
            location.href = "https://www.baidu.com";//将当前网址改为bd
        }, 3000);


        function t1(){
            location.reload();//刷新当前文档
            location.assign("https://www.jd.com");//载入新的文档
            location.replace("https://www.vip.com");//替换原来文档
        }


    </script>
</head>

<body>

</body>

</html>